<template>
  <div class="wrapper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="item of swiperList" :key="item.id">
        <img class="swiper-img" :src="item.img" />
      </swiper-slide>
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      },
      swiperList: [{
        id: '001',
        img: 'http://dimg04.c-ctrip.com/images/70040w000000kp7e75D4C_750_284_191.jpg'
      },
      {
        id: '002',
        img: 'http://dimg04.c-ctrip.com/images/700a0u000000j2kj9A02B_750_284_191.jpg'
      }]
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper >>> .swiper-pagination-bullet-active
    background-color: #fff
  .wrapper
    width: 100%
    height: 0
    padding-bottom: 37%
    overflow: hidden
    background: #ccc
    .swiper-img
      width: 100%
</style>
